home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)td.d64
/
phoenix.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
4KB
|
138 lines
5 REM - ADAPTED BY THE COMPUCATS 680 W BEL AIR AVE ABERDEEN MD 21001
10 PRINT"[147]":POKE53280,6:POKE53281,15
15 GG=0
20 PRINTSPC(89)"[169] [223][146] [223][146] [169][223][146] [169] [146] [146]"
22 PRINTTAB(9)"[223][223][146] [146] [146] [169][146][169][223][223][146] [146] [146][185]"
24 PRINTTAB(10)"[223][223][146] [146][169] [146][162][162] [146] [146] [146][184]"
26 PRINTTAB(9)"[223] [146][169] [146] [146] [146] [223] [146] [146]"
30 PRINTSPC(46)" [223][146] [146] [146] [169] [223][146] [146] [223][146] [146] [146] [223][146] [169][146]"
32 PRINTTAB(6)" [146] [146] [146][185] [146] [146] [146] [146][185] [146][223][223] [146] [146] [223][223][169][146][169]"
34 PRINTTAB(6)" [146][169] [146][184] [146] [146] [146] [146][184] [146] [223] [146] [146] [146]"
36 PRINTTAB(6)" [146] [146] [146] [223] [146][169] [146] [146] [146] [146] [169][146][169][223][223][146]"
38 PRINTSPC(88)"[156]ADAPTED BY THE COMPUCATS"
40 PRINTSPC(88)"PRESS F1 FOR INSTRUCTIONS"
42 PRINTSPC(88)"PRESS F7 TO BEGIN"
44 GETA$:IFA$=""THEN44
46 IFA$=CHR$(136)THEN100
48 IFA$=CHR$(133)THEN50
49 GOTO44
50 PRINT"[147]":PRINTSPC(88)"[158]**** [144]INSTRUCTIONS [158]****"
51 PRINTSPC(85)"USE JOYSTICK IN PORT # 2."
52 PRINTSPC(45)"USE FIRE BUTTON TO SHOOT."
53 PRINTSPC(45)"SHOOT EGGS AS THEY FALL."
54 PRINTSPC(45)"SHOOT PHOENIX BIRDS AS THEY RISE."
56 PRINTSPC(125)"PRESS F1 TO CONTINUE"
57 GETA$:IFA$=""THEN57
58 IFA$=CHR$(133)THEN60
59 GOTO57
60 PRINT"[147]":PRINTSPC(125)"EGGS WILL DROP FROM THE CLOUDS."
61 PRINTSPC(45)"IF ONE HITS THE GROUND IT WILL PRODUCE A PHOENIX BIRD."
62 PRINTSPC(45)"IF A BIRD RISES TO THE SKY IT WILL EAT SOME CLOUDS."
63 PRINTSPC(45)"IF YOU FIRE AND MISS YOU WILL WIPE OUT A CLOUD."
64 PRINTSPC(45)"GAME OVER IF YOU TOUCH EGG OR BIRD OR WHEN CLOUDS"
65 PRINTTAB(5)"ARE ALMOST GONE OR IF YOU SHOOT ALL BIRDS."
68 PRINTSPC(45)"PRESS F1 TO BEGIN"
70 GETA$:IFA$=""THEN70
72 IFA$=CHR$(133)THEN100
75 GOTO70
100 PRINT"[147]":PRINTSPC(125)"WHAT GAME LEVEL DO YOU WANT"
105 PRINT:INPUT" 1-4";A$:A=VAL(A$):A=A-1
110 IFA<0ORA>4THEN100
115 PRINT"[147]":POKE53280,0:POKE53281,0
120 CO=54272:G=1945:CL=30:SC=0
121 POKECO+24,15:POKECO+6,240:POKECO+4,33
122 IFGG=1THEN130
125 DIMB(5),D(5)
130 FORI=1064TO1103:POKEI,90:POKEI+CO,3:NEXT
135 FORWA=0TOA
140 FORI=0TOWA:B(I)=1064+INT(RND(1)*39):D(I)=39+INT(RND(1)*3)
145 NEXTI
150 FORI=1984TO2023:POKEI,160:POKEI+CO,5:NEXT
155 POKEG-1,112:POKEG,113:POKEG+1,110
160 NA=WA+1
165 FORJ=1TO2
170 FORI=0TOWA
175 IFB(I)=0THEN300
180 POKEB(I),32:IFD(I)>0THEN200
185 POKEB(I)-1,32:POKEB(I)+1,32:POKEB(I)-40,32:POKEB(I)-79,32:POKEB(I)-81,32
190 POKEB(I)-41,32:POKEB(I)-39,32:POKEB(I)-80,32
195 IFD(I)>0ANDPEEK(B(I))<>32THEND(I)=INT(RND(1)*3-41)
200 B(I)=B(I)+D(I):IFB(I)>1983THEND(I)=INT(RND(1)*3-41):B(I)=B(I)+D(I)
205 IFD(I)>0ORB(I)>=1104THEN230
210 IFPEEK(B(I)-80)=32THEN220
215 POKEB(I)-80,32:CL=CL-1
220 D(I)=INT(RND(1)*2)+39:B(I)=INT(RND(1)*39)+1064
230 IFD(I)<0THEN250
235 POKECO+B(I),7:POKEB(I),81
240 GOTO300
250 POKEB(I)+CO,7:POKEB(I)-1+CO,7:POKEB(I)+1+CO,7:POKEB(I)-40+CO,6
255 POKEB(I)-41+CO,5:POKEB(I)-39+CO,5:POKEB(I)-80+CO,2
260 POKEB(I)-79+CO,5:POKEB(I)-81+CO,5
265 POKEB(I),113:POKEB(I)-1,85:POKEB(I)+1,73:POKEB(I)-40,102
270 POKEB(I)-80,88
275 ONJGOTO280,290
280 POKEB(I)-41,105:POKEB(I)-39,95
285 GOTO300
290 POKEB(I)-81,95:POKEB(I)-79,105
300 IFCL<=20THEN1000
305 JS=15-(PEEK(56320)AND15)
307 IFJS<>4ANDJS<>8THEN350
310 POKEG-1,32:POKEG,32:POKEG+1,32
315 IFJS=4THENG=G-1:GOTO325
320 IFJS=8THENG=G+1
325 IFPEEK(G-1)<>32ORPEEK(G)<>32ORPEEK(G+1)<>32THEN1010
330 IFG<1945THENG=1945
335 IFG>1981THENG=1981
340 POKEG-1,112:POKEG,113:POKEG+1,110
345 POKEG-1+CO,1:POKEG+CO,1:POKEG+1+CO,1
350 IF(PEEK(56320)AND16)=16THEN400
355 FORQ=5TO90:POKECO+1,Q:NEXTQ
360 X=G-40
365 POKEX+CO,7
370 IFPEEK(X)<>32THENGOSUB700:GOTO390
375 POKEX,93
380 X=X-40:IFX>1064THEN365
385 X=X+40
390 FORY=G-40TOXSTEP-40:POKEY,32:NEXT
395 POKECO+1,0
400 NEXTI:NEXTJ
402 IFCL<=20THEN1000
405 IFNA>0THEN165
410 NEXTWA
420 W1=1:GOTO1015
700 IFPEEK(X)=90THENCL=CL-1:POKEX,87:GOSUB900:RETURN
705 POKEX+CO,4:POKEX+CO+39,4:POKEX+CO+41,4
710 POKEX+CO-41,4:POKEX+CO-39,4
715 POKEX,209:POKEX+39,255:POKEX+41,127
720 POKEX-41,127:POKEX-39,255
725 FORY=0TOWA:IFB(Y)<>XORD(Y)<0THEN740
730 IFRND(1)>.7THENB(Y)=0:NA=NA-1:SC=SC+25:GOSUB800:GOTO740
735 D(Y)=INT(RND(1)*3-41):GOSUB900:GOTO745
740 IFB(Y)<>XORD(Y)>0THEN760
745 SC=SC+50:B(Y)=0:NA=NA-1:GOSUB800
750 POKEX-1,32:POKEX+1,32:POKEX-40,32:POKEX-41,32:POKEX-39,32
755 POKEX-80,32:POKEX-79,32:POKEX-81,32
760 NEXTY
765 POKEX+39,32:POKEX+41,32:POKEX-41,32:POKEX-39,32
770 RETURN
800 FORQ=100TO30STEP-5:POKECO+1,Q:FORT=1TO30:NEXTT:NEXTQ
805 POKECO+1,0
810 RETURN
900 FORQ=50TO150STEP5:POKECO+1,Q:FORT=1TO30:NEXTT:NEXTQ
905 POKECO+1,0
910 RETURN
1000 W1=2
1005 GOTO1015
1010 W1=3
1015 FORT=1TO300:NEXT
1020 PRINT"[147]"
1025 PRINTSPC(173)"GAME OVER"
1030 PRINTSPC(88)"[159]YOUR SCORE IS ";SC
1035 IFW1=1THENPRINTSPC(88)"[158]YOU STOPPED THE BIRDS"
1040 IFW1=2THENPRINTSPC(88)"[158]TOO MANY CLOUDS ARE GONE"
1045 IFW1=3THENPRINTSPC(88)"[158]YOU COLLIDED WITH THE ENEMY"
1050 PRINTSPC(88)"[156]PRESS F1 TO PLAY AGAIN"
1055 GETA$:IFA$=""THEN1055
1060 IFA$=CHR$(133)THENGG=1:GOTO100
1070 GOTO1055